<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:33:"./app/admin\view\login/index.html";i:1627040370;}*/ ?>

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>后台登录</title>
<link rel="stylesheet" type="text/css" href="/public/admin/css/login.css?">
<script src="/public/admin/lib/layui/layui.js" charset="utf-8"></script>
</head>
<body>
<div id="wrapper" class="login-page">
<div id="login_form" class="form">
<form class="login-form layui-form" action="">
 <h2>管理登录</h2>
<input type="text" name="phone" placeholder="用户名"/>
<input type="password" name="password" placeholder="密码"/>
<button id="login" lay-submit lay-filter="cms">登　录</button>
</form> 
</div>
</div>
<script src="/public/admin/js/jquery.min.js"></script>
<script>
layui.use('form',function(){
  var form = layui.form
  ,jq = layui.jquery;
  form.on('submit(cms)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000']
    });
    var param = data.field;
    jq.post('<?php echo url("admin/login/index"); ?>',param,function(data){
      if(data.code == 1){
        layer.close(loading);
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
          location.href = '<?php echo url("admin/index/index"); ?>';
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {icon: 2, anim: 2, time: 1000});
      }
    });
    return false;
  });
});
</script>
</body>
</html>